package com.qidian.buy.dto;

/**
 * Author: 戴着假发的程序员
 * Date: 2024-05-15 13:37
 * company: 起点编程
 **/

public class ItemMessageDTO implements java.io.Serializable{
    public static final String OP_INSERT = "insert";
    public static final String OP_UPDATE = "update";
    public static final String OP_DELETE = "delete";
    private Long itemId; // 正在操作的商品编号
    private String option; // 具体的操作

    public ItemMessageDTO() {
    }
    public ItemMessageDTO(Long itemId, String option) {
        this.itemId = itemId;
        this.option = option;
    }

    public static ItemMessageDTO insert(Long itemId){
        return new ItemMessageDTO(itemId,OP_INSERT);
    }
    public static ItemMessageDTO update(Long itemId){
        return new ItemMessageDTO(itemId,OP_UPDATE);
    }
    public static ItemMessageDTO delete(Long itemId){
        return new ItemMessageDTO(itemId,OP_DELETE);
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getOption() {
        return option;
    }

    public void setOption(String option) {
        this.option = option;
    }
}
